projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95fd47e
)
Allow shortnmae length to be overridden on command line.
author
robertl
<robertl>
Mon, 10 Feb 2003 19:36:25 +0000
(19:36 +0000)
committer
robertl
<robertl>
Mon, 10 Feb 2003 19:36:25 +0000
(19:36 +0000)
mapsource.c
patch
|
blob
|
history
diff --git
a/mapsource.c
b/mapsource.c
index 6be9d627e936723692959b5580d858d4289490a7..08535e8c85b4b15808825cf898a84e5cb88710a9 100644
(file)
--- a/
mapsource.c
+++ b/
mapsource.c
@@
-73,6
+73,15
@@
static icon_mapping_t icon_table[] = {
{ -1, NULL },
};
+char *snlen;
+
+static
+arglist_t mps_args[] = {
+ {"snlen", &snlen, "Length of generated shortnames" },
+ {0, 0, 0}
+};
+
+
const char *
mps_find_desc_from_icon_number(const int icon)
{
@@
-264,7
+273,13
@@
mps_waypt_pr(const waypoint *wpt)
void
mps_write(void)
{
- int short_length = 10;
+ int short_length;
+
+ if (snlen)
+ short_length = atoi(snlen);
+ else
+ short_length = 10;
+
mkshort_handle = mkshort_new_handle();
setshort_length(mkshort_handle, short_length);
@@
-284,4
+299,5
@@
ff_vecs_t mps_vecs = {
mps_wr_deinit,
mps_read,
mps_write,
+ mps_args
};